package com.digitaleye.dpslite;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.database.Cursor;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;
import android.preference.Preference.OnPreferenceChangeListener;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import com.downpayment.dps.R;






public class SettingsActivity extends PreferenceActivity {
	
	String tag = "SettingsActivity";
	
	AccountDBHelper accountDBHelper;
	DBHelper dbHelper;
	HistoryHelper historyHelper;
	WebHelper webHelper;
	
    final int CLEAR_ACCOUNT_DIALOG = 1;
    final int UNLINK_ACCOUNT_DIALOG = 2;
    final int UNLINK_ACCOUNT_DIALOG_NOTLINKED = 3;
    final int CHANGE_MODE_DIALOG = 4;
    
    int selectedAccountID = -1;
    
	@Override
	public void onConfigurationChanged(Configuration newConfig){
		super.onConfigurationChanged(newConfig);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
	}
    
	@Override
    public void onCreate(Bundle savedInstanceState) {        
        super.onCreate(savedInstanceState);      
        
        setTheme(R.style.PrefsTheme);
        
        this.getListView().setBackgroundDrawable(Utility.returnAdjustedBackgroundDrawable(this));

        
        addPreferencesFromResource(R.xml.preferences);       
        
        
        accountDBHelper = new AccountDBHelper(this);
        dbHelper = new DBHelper(this);
        historyHelper = new HistoryHelper(this);
        webHelper = new WebHelper(this);
        
    }
    
    

    

	

}
    
